/*
 *    Copyright (c) 2018-2025, 云集汇通 All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the yunjihuitong.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 */

package com.yjht.common.func.validator;

import com.yjht.common.exception.LocalException;
import org.apache.commons.lang.StringUtils;

/**
 * 数据校验
 * @author lengleng
 * @email wangiegie@gmail.com
 * @date 2017-03-23 15:50
 */
public abstract class Assert {

    public static void isBlank(String str, String message) {
        if (StringUtils.isBlank(str)) {
            throw new LocalException("0LE2101002",message);
        }
    }

    public static void isNull(Object object, String message) {
        if (object == null) {
            throw new LocalException("0LE2101002",message);
        }
    }
}
